//
//  BasePopMenuController.h
//  Camera
//
//  Created by gml on 2018/11/2.
//  Copyright © 2018年 gml. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIView+DrawGraphics.h"

// 菜单展示位置单例
typedef NS_ENUM(NSInteger, GMLMenuPlacements) {
    GMLMenuPlacements_Top = 0,
    GMLMenuPlacements_Left,
    GMLMenuPlacements_Bottom,
    GMLMenuPlacements_Right
};

typedef NS_ENUM(NSInteger,GMLMenuArrowStyle) {
    GMLMenuShowAnimationStyle_Round = 0, // 圆角箭头
    GMLMenuShowAnimationStyle_Triangle// 菱角箭头
};

typedef NS_ENUM(NSInteger,GMLMenuShowAnimationStyle) {
    GMLShowAnimation_Default = 0,// 没有动画
    GMLShowAnimation_Zoom// 缩放动画
};

// 菜单箭头高度
static CGFloat const ARROWHEIGHT = 10.f;
// 菜单圆润度
static CGFloat const MENUCORNERRADIUS = 5.f;

@class BasePopMenuController;
@protocol BasePopMenuControllerDelegate <NSObject>
@optional
/**
 使用不带选中状态的菜单需要实现的协议方法
 
 @param tag 被点击的菜单单元标志值
 @param title 被点击的菜单单元标题
 */
- (void)menu:(BasePopMenuController *)menu didClickedItemUnitWithTag:(NSInteger)tag andItemUnitTitle:(NSString *)title;

/**
 使用带选中状态的菜单需要实现的协议方法
 
 @param tag 被点击的菜单单元标志值
 @param title 被点击的菜单单元标题
 @param state 菜单单元点击后的状态
 */
- (void)menu:(BasePopMenuController *)menu didClickedMenuItemUnitWithTag:(NSInteger)tag andItemUnitTitle:(NSString *)title itemiUnitPostClickState :(BOOL)state;

@end


@interface BasePopMenuController : UIViewController

/**显示菜单view**/
- (void)presentMenuView;

/** 菜单移除方法 */
- (void)removeMenuView;

@property (nonatomic,weak) id<BasePopMenuControllerDelegate>delegate;

@end

